package com.rlyy.rsj.utils;


public class DistributeLock {

    public static final long EightHour = 12 * 60 * 60;// 加锁一分半
    public static final long OneAndHalfMun = 90;// 加锁一分半
    public static final long twoMinute = 2 * 60;// 加锁一分半
    public static final long oneMinute = 60; //


    public static boolean lock(String lockKey, String value, long expire) {
        return RedisUtils.setNx(lockKey, value, expire);
    }

    public static void unlock(String lock) {
        RedisUtils.del(lock);
    }

    public static String get(String key) {
        return RedisUtils.getString(key);
    }

}
